package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.CurrencyDao;
import com.home.qh.model.Currency;
import com.home.qh.service.CurrencyManager;

@Service("currencyManager")
public class CurrencyManagerImpl extends GenericManagerImpl<Currency, Long> implements	CurrencyManager {
	CurrencyDao currencyDao;

    @Autowired
    public CurrencyManagerImpl(CurrencyDao currencyDao) {
        super(currencyDao);
        this.currencyDao = currencyDao;
    }

	public List<Currency> getCurrencyByCodeAndName(String currencyCode,
			String currencyName) {
		return currencyDao.getCurrencyByCodeAndName(currencyCode, currencyName);
	}

	public List<Currency> getCurrencyByCurrency(Currency currency, String sort, boolean desc, int startResult, int maxResults) {
		return currencyDao.getCurrencyByCurrency(currency, sort, desc, startResult, maxResults);
	}
}
